<%--
  Created by IntelliJ IDEA.
  User: Smile
  Date: 2019/1/20
  Time: 1:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE html>
<html>
<head>
    <base href="<%=basePath%>">

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>试题预览</title>
    <meta name="keywords" content="">
    <link rel="shortcut icon"
          href="<%=basePath%>resources/images/favicon.ico" />
    <link href="resources/bootstrap/css/bootstrap-huan.css" rel="stylesheet">
    <link href="resources/font-awesome/css/font-awesome.min.css"
          rel="stylesheet">
    <link href="resources/css/style.css" rel="stylesheet">
    <link href="resources/css/exam.css" rel="stylesheet" type="text/css">
</head>
<body>
<jsp:include page="header.jsp"/>
<div class="container" style="min-height:500px;">

    <div class="row">

        <div class="col-xs-2">
            <ul class="nav default-sidenav">
                <li>
                    <a href="student/question/question-add"> <i class="fa fa-pencil-square-o"></i> 添加试题 </a>
                </li>
                <li class="active">
                    <a> <i class="fa fa-bar-chart-o"></i> 试题管理 </a>
                </li>

            </ul>
        </div>
        <div class="col-xs-10" id="right-content">
            <div class="page-header">
                <h1>
                    <i class="fa fa-file-text"></i> 试题预览
                </h1>
            </div>
            <div class="page-content">
                <div class="def-bk" id="bk-exampaper">

                    <div class="expand-bk-content" id="bk-conent-exampaper">
                        <ul id="exampaper-body" style="padding: 0px;">
                            ${strHtml }
                            <div class="answer-desc-detail">
                                <label class="label label-primary"><i
                                        class="fa fa-check-square-o"></i><span> 添加人</span></label>
                                <div class="answer-desc-content">${question.creator }</div>
                            </div>
                        </ul>
                        <div id="exampaper-footer"
                             style="height: 187px; text-align: center; margin-top: 40px;">
                            <c:choose>
                                <c:when
                                        test="${question.status == 6}">
                                    <button class="btn btn-info"
                                            onclick="javascript:window.close();">
                                        <i class="fa fa-times"></i> 关闭页面
                                    </button>
                                </c:when>
                                <c:when
                                        test="${question.creator == sessionScope.SPRING_SECURITY_CONTEXT.authentication.principal.username}">
                                    <%--<button class="btn btn-danger" id="delete-question-btn">
                                        <i class="fa fa-trash-o"></i> 作废该题
                                    </button>--%>
                                    <button class="btn btn-info"
                                            onclick="javascript:window.close();">
                                        <i class="fa fa-times"></i> 关闭页面
                                    </button>
                                </c:when>
                                <c:otherwise>
                                    <button class="btn btn-info"
                                            onclick="javascript:window.close();">
                                        <i class="fa fa-times"></i> 关闭页面
                                    </button>
                                </c:otherwise>
                            </c:choose>

                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="footer.jsp"/>
<!-- Javascript files -->
<!-- jQuery -->
<script type="text/javascript"
        src="resources/js/jquery/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="resources/js/all.js"></script>
<script type="text/javascript"
        src="resources/js/jquery/jquery-ui-1.9.2.custom.min.js"></script>

<script type="text/javascript"
        src="resources/js/uploadifive/jquery.uploadifive.js"></script>
<script type="text/javascript"
        src="resources/js/question-upload-img.js"></script>
<script type="text/javascript" src="resources/js/field-2-point.js"></script>
<script type="text/javascript" src="resources/js/question-add.js"></script>

<!-- Bootstrap JS -->
<script type="text/javascript"
        src="resources/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
